package cn.kailangtu.commontools;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class DateTimeUtils {
    private static DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    private static DateFormat formatterYMD = new SimpleDateFormat("yyyyMMdd");

    public static String longToYMDHMS(long currentValue){

        return formatter.format(new Date(currentValue));
    }

    public static String nowYMDHMS(){
        return formatter.format(new Date());
    }

    public static String nowYYMMDD(){
        return formatterYMD.format(new Date());
    }


}
